<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <div id="table1">
            行：<input type="text" id="h"/>
            列：<input type="text" id="l"/>
            <input type="button" value="生成" onclick="addTable();">
            <div id="divt"></div>
        </div>
    </div>
</body>
    <script type="text/javascript">
    function addTable(){
    var h = document.getElementById("h").value;
    var l = document.getElementById("l").value;
    var divtab = document.getElementById("divt");
    var tab = "<table border='solid' style='width:1400px;height:700px'>";

    for(var i=0;i<h;i++){
        tab += "<tr>";
        for(var j=0;j<l;j++){
            tab += "<td>";
            tab += "</td>";
        }
        tab += "</tr>"
    }
    tab += "</table>";
    divtab.innerHTML=tab;
    }
    </script>
</html>